package com.huawei.appmarket.service.externalapi.actions;

import com.huawei.hms.support.api.entity.pay.HwPayConstant;
import com.huawei.hms.support.hianalytics.HiAnalyticsConstant;
import com.huawei.secure.android.common.intent.SafeIntent;
import java.util.LinkedHashMap;
import o.dgh;
import o.Logger;
import o.dyr;
import o.dys.a;
import o.eqp;

public class ProtocolAction extends dyr {
    private static final String DISTRIBUTION_AGREE_PROTOCOL = "380601";
    private static final String TAG = "ProtocolAction";

    public ProtocolAction(a aVar) {
        super(aVar);
    }

    public void onAction() {
        if (this.callback == null) {
            Logger.e(TAG, "third activity callback is null!");
            return;
        }
        SafeIntent safeIntent = new SafeIntent(this.callback.getIntent());
        String stringExtra = safeIntent.getStringExtra("source");
        if (stringExtra != null && stringExtra.equals("AGTransport")) {
            LinkedHashMap linkedHashMap = new LinkedHashMap();
            linkedHashMap.put(HiAnalyticsConstant.BI_KEY_RESUST, "1");
            linkedHashMap.put("callWay", "1");
            linkedHashMap.put("method", safeIntent.getStringExtra("method"));
            linkedHashMap.put(HwPayConstant.KEY_COUNTRY, eqp.ॱ());
            linkedHashMap.put("advPlatform", String.valueOf(safeIntent.getIntExtra("advPlatform", 0)));
            linkedHashMap.put("mediaPkg", safeIntent.getStringExtra("mediaPkg"));
            linkedHashMap.put("advInfo", safeIntent.getStringExtra("advInfo"));
            linkedHashMap.put("referrer", safeIntent.getStringExtra("referrer"));
            dgh.ˋ(DISTRIBUTION_AGREE_PROTOCOL, linkedHashMap);
        }
        this.callback.setResult(1001, null);
        this.callback.finish();
    }
}
